package com.sunnada.demo.log.bean;

import com.sunnada.demo.log.annotation.LogField;
import com.sunnada.demo.log.annotation.MongoAutoId;
import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.persistence.Id;
import java.util.Date;
/**
 * @program: mybatisproject2
 * @description: 操作日志
 * @author: 李瑞益
 * @create: 2018-10-28 14:26
 **/
@Document(collection = "track_log")
@Data
public class TrackLog {
    @LogField(value = "主键", primaryKey = true)
    private String id;

    @MongoAutoId
    private Long autoId;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 企业的guid
     */
    private String primaryGuid;

    /**
     * 企业id
     */
    private String companyId;

    /**
     * 操作类型：新增、更新、删除等
     */
    private String operationType;

    /**
     * 实体对应的名称
     */
    private String entityName;

    /**
     * 操作信息
     */
    private String logMessage;

    /**
     * 请求的url
     */
    private String url;

    /**
     * 变更的类的全名
     */
    private String clasDisplayName
            ;

    private Date createTime;
}
